home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 3
/
Cream of the Crop 3.iso
/
clipper
/
ks94an.zip
/
Q_CONFIR.HDR
< prev
next >
Wrap
Text File
|
1994-04-25
|
2KB
|
60 lines
/******************************************************************************
The Klipper Library, for CA-Clipper 5.x
Copyright (c), 1994, Wallace Information Systems Engineering
FUNCTION:
_Q_Confirm( cConfirm_Desc, nQRowMod, nQColMod ) --> lYesNo
PARAMETERS:
cConfirm_Desc : Question to ask
nQRowMod : Row Modification Value (Default 0)
nQColMod : Column Modification Value (Default 0)
SHORT:
Asks a Y/N Question, returning TRUE or FALSE.
DESCRIPTION:
_Q_Confirm asks a "Yes or No" question supplied in cConfirm_Desc and returns
a logical indicating the entered response. The response box is centered
on the screen.
The default message, if not specified, is a plain vanilla "Yes or No?
(y/n)" message. I suggest you specify one to avoid User-Mayhem.
nQRowMod and nQColMod are ADDED to these defaults and can be use to move
the box off-center. To move the box up or to the left, use negative values.
(ie, nGColMod = -5, would cause the box to to be first centered, but
then moved -5 Columns to the right (Adding negative numbers effectively
causes a move to the LEFT, or 5 columns to the LEFT).
NOTE:
EXAMPLE:
t = _Q_Confirm('Is it raining outside?')
Result: t = a logical .t. / .f. depending upon user response.
_Q_Confirm() can be used as an in-line assignment, making it possible to ask
question in the middle of other function call (embedding it's return value as
the parameter for another function) or program statements as in:
if _Q_Confirm('Did lightning really strike your Aunt Mabels Big Toe?')
@ 10,10 say "I'm so sorry..."
else
@ 10,10 say 'My! What big tales you tell...'
endif
if DestroyEverything(_Q_Confirm('Really?"))
DESTROY EVERYTHING
endif
******************************************************************************/